<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:http="http://www.w3.org/1999/xhtml"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8"/>
    <title>主页</title>

    <script src="https://lib.baomitu.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://lib.baomitu.com/underscore.js/1.9.1/underscore-min.js"></script>
</head>
<body>
<div sec:authorize="isAuthenticated()">
    <span sec:authentication="name"></span>
    <span>你已经登录</span>
</div>

<div sec:authorize="isAnonymous()">
    <!--<button id="loginbtn" href="/login">登录</button>-->
    <!--<button id="registerbtn" href="/register">注册</button>-->
    <a href="/login">登录</a>
    <a href="/register">注册</a>
</div>


</body>
</html>